<template>
	<view>
		<web-view :src="url" ></web-view>
	</view>
</template>

<script>
	//index.js
	//获取应用实例
	var app = getApp();
	export default {
	    data() {
	        return {
	            url:''
	        };
	    },
	    onLoad(obj) {
			console.log(obj,'------')
			if(obj.url_type){
				var url_type = obj.url_type
				this.init(url_type)
			}
	       if(obj.url){
	       	this.url = decodeURIComponent(obj.url)
	       	// this.init(url_type)
	       }
	    },
	    methods: {
			init(url_type){
				var that = this;
				app.globalData.util.request({
					url: 'Webview/urls',
					data:{
						url_type:url_type
					},
					// cachetime: '30',
					success: function(res) {
						console.log(res,'rrr---')
						that.url = res.data.data.data.url
						
					}
				}, true);
			}
		}
	};
</script>

<style>
</style>